<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
		<!--[if lt IE 9]>
			<script type="text/javascript" src="/webSite/js/html5.js"></script>
		<![endif]-->
	</head>
	<body>
		<div class="upload">上传图片1</div>
		<div class="upload2">上传图片2</div>
		<img src="" id="img" />
	</body>
	<script type="text/javascript" src="/webSite/js/jquery-2.1.0.js" ></script>
	<script>
		function Xui(){};
		
		var form = new Xui();
		form.upload({
			fileBtn : ".upload",
			url : "/upimg",
			method : "post"
		} , function(data){
			console.log(data);
		});
		form.upload({
			fileBtn : ".upload2",
			url : "/upimg",
			method : "post"
		} , function(data){
			if(data.state == "ok"){
				$("#img").attr("src" , data.url);
			}
		});
	</script>
</html>
